﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class GetStart : MonoBehaviour
{
	public Vector3 myValue = new Vector3(0, 0, 0);
	public float myValue2 = 0f;
	public Transform cubeTran;
	public RectTransform imgRectTran;
	
	// Use this for initialization
	void Start () {
		//对变量做一个动画（通过插值的方式去修改一个值的变化）
		DOTween.To(delegate() { return myValue; }, (x) => myValue = x, new Vector3(0, 0, 0), 2.0f);
		DOTween.To(() => myValue2, x => myValue2 = x, 10f, 2.0f);
	}
	
	// Update is called once per frame
	void Update ()
	{
		// cubeTran.position = myValue;
		imgRectTran.localPosition = myValue;
	}
}
